/*********************************************************************************/
/*                                                                               */
/*      GPT Driver                                                               */
/*                                                                               */
/*      Last updated by:   CBS                                                   */
/*      Last update date:  2013/1/25                                             */
/*      Revision:          0                                                     */
/*      Copyright:         DENS0                                                 */
/*                                                                               */
/*********************************************************************************/

#ifndef GPT_CFG_H_
#define GPT_CFG_H_

/*********************************************************************************/
/*  include files                                                                */
/*********************************************************************************/
#include "Std_Types.h"


/** Channel id type */
typedef U1 Gpt_ChannelType;

/** Channel time value type */
typedef U4 Gpt_ValueType;

/** Channel behavior */
typedef enum
{
  GPT_MODE_ONESHOT=0,
  GPT_MODE_CONTINUOUS
} Gpt_ChannelMode;

typedef enum
{
  GPT_MODE_NORMAL=0,
  GPT_MODE_SLEEP
} Gpt_ModeType;



/* This container contains the channel-wide configuration (parameters) of the GPT Driver */
typedef struct  
{
	U4  GptChannelClkSrcRef;
	Gpt_ChannelType  GptChannelId;             /* Channel Id of the GPT channel */
	Gpt_ChannelMode  GptChannelMode;           /* Specifies the behaviour of the timer channel after the timeout has expired */
	void (*GptNotification)();                 /* Function pointer to callback function */
	U1 GptNotificationPriority;
	U4  GptChannelPrescale;                    /* GPT module specific prescaler factor per channel */
	boolean  GptEnableWakeup;                  /* Enables wakeup capability of CPU for a channel when timeout period expires */
} Gpt_ConfigType;

/* The list of channel configurations */
extern const Gpt_ConfigType GptConfigData[];

#endif /*GPT_CFG_H_*/
